%compute the image contrast value
%a:grid image
function Fcon=contrast(a)
%a=imread(p);
%transfer 2D vector to 1D
x=a(:);
x=double(x);
%Moment of order four 
M4=mean((x-mean(x)).^4);
%mean squre error
delta2=var(x,1);
%kurtosis
alfa4=M4/(delta2^2);
%standard variation
delta=std(x,1);
%contrast value
Fcon=delta/(alfa4^(1/4));
Fcon=10000/Fcon;